﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.FAS.Runtime.Metadata.Entity.DataModel;

namespace T.FAS.Runtime.DataAccess.SPI
{
    public interface ICompositeDataObjectCache
    {
        bool IsLocalModel { get; set; }    

        void Add(CompositeDataObject CompositeDataObject);

        CompositeDataObject Get(string CompositeDataObjectId);

        CompositeDataObject TryGet(string CompositeDataObjectId, out bool isSuccess);

        CompositeDataObject GetFallback(string CompositeDataObjectId);

        int GetLatestVersion(string CompositeDataObjectId);

        void Set(CompositeDataObject CompositeDataObject);

        Action<string> CacheSyncAction { get; }

        void Remove(string CompositeDataObjectId);
    }
}
